package com.yaodian100.ec.activity.entity;

import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import com.yaodian100.core.common.entity.BaseEntity;

/**
 * 
 * @author chin.hung
 *
 */
@Entity
@Table(name = "EC_ACTIVITY_PAGE")
public class ActivityPage extends BaseEntity {

	private static final long serialVersionUID = 1L;

	/**
	 * 流水號
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "seq_ec_activity_page")
	@SequenceGenerator(name = "seq_ec_activity_page", sequenceName = "SEQ_EC_ACTIVITY_PAGE")
	@Column(name = "ID")
	private Long id;

	/**
	 * 活動頁面名稱
	 */
	@Column(name = "TITLE", length = 50, nullable = false)
	private String title;

	/**
	 * 頁面生成位置
	 */
	@Column(name = "PAGE_LOCATION", length = 200)
	private String pageLocation;

	/**
	 * 主視覺區塊flag
	 * 1.使用圖檔連結
	 * 2.使用上傳圖檔
	 * 3.使用html檔案
	 * 4.HTML 自訂內容
	 */
	@Column(name="MAIN_VISUAL_CONTENT_TYPE")
	private Integer mainVisualContentType;
	
	/**
	 * 1.主視覺區塊圖檔位置
	 */
	@Column(name = "MAIN_VISUAL_IMAGE_URL", length = 200)
	private String mainVisualImageUrl;

	/**
	 * 2.主視覺區塊上傳圖檔位置
	 */
	@Column(name = "MAIN_VISUAL_IMAGE_FILE_PATH", length = 200)
	private String mainVisualImageFilePath;

	/**
	 * 主視覺區塊圖檔點擊目的網址
	 */
	@Column(name = "MAIN_VISUAL_IMAGE_TARGET_URL", length = 200)
	private String mainVisualImageTargetUrl;

	/**
	 * 3.主視覺區塊 HTML 檔案位置
	 */
	@Column(name = "MAIN_VISUAL_HTML_FILE_PATH", length = 200)
	private String mainVisualHtmlFilePath;

	/**
	 * 4.主視覺區塊 HTML 自訂內容
	 */
	@Lob
	@Basic(fetch=FetchType.LAZY)
	@Column(name = "MAIN_VISUAL_HTML_CONTENT")
	private String mainVisualHtmlContent;

	/**
	 * 樣式
	 */
	@Column(name = "STYLE_ID")
	private Long styleId;

	/**
	 * 活動預期上線日
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "EXPECTED_ONLINE_DATE")
	private Date expectedOnlineDate;

	/**
	 * 自訂檔案名
	 */
	@Column(name = "CUSTOM_FILE_NAME", length = 30)
	private String customFileName;
	
	/**
	 * 是否完成所有設定可產生html
	 */
	@Transient
	private Boolean complete;
	
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getPageLocation() {
		return this.pageLocation;
	}

	public void setPageLocation(String pageLocation) {
		this.pageLocation = pageLocation;
	}

	public String getMainVisualImageUrl() {
		return this.mainVisualImageUrl;
	}

	public void setMainVisualImageUrl(String mainVisualImageUrl) {
		this.mainVisualImageUrl = mainVisualImageUrl;
	}

	public String getMainVisualImageFilePath() {
		return this.mainVisualImageFilePath;
	}

	public void setMainVisualImageFilePath(String mainVisualImageFilePath) {
		this.mainVisualImageFilePath = mainVisualImageFilePath;
	}

	public String getMainVisualImageTargetUrl() {
		return this.mainVisualImageTargetUrl;
	}

	public void setMainVisualImageTargetUrl(String mainVisualImageTargetUrl) {
		this.mainVisualImageTargetUrl = mainVisualImageTargetUrl;
	}

	public String getMainVisualHtmlFilePath() {
		return this.mainVisualHtmlFilePath;
	}

	public void setMainVisualHtmlFilePath(String mainVisualHtmlFilePath) {
		this.mainVisualHtmlFilePath = mainVisualHtmlFilePath;
	}

	public String getMainVisualHtmlContent() {
		return this.mainVisualHtmlContent;
	}

	public void setMainVisualHtmlContent(String mainVisualHtmlContent) {
		this.mainVisualHtmlContent = mainVisualHtmlContent;
	}


	public Date getExpectedOnlineDate() {
		return expectedOnlineDate;
	}

	public void setExpectedOnlineDate(Date expectedOnlineDate) {
		this.expectedOnlineDate = expectedOnlineDate;
	}

	public String getCustomFileName() {
		return this.customFileName;
	}

	public void setCustomFileName(String customFileName) {
		this.customFileName = customFileName;
	}

	public Integer getMainVisualContentType() {
		return mainVisualContentType;
	}

	public void setMainVisualContentType(Integer mainVisualContentType) {
		this.mainVisualContentType = mainVisualContentType;
	}

	public Long getStyleId() {
		return styleId;
	}

	public void setStyleId(Long styleId) {
		this.styleId = styleId;
	}

	public Boolean getComplete() {
		return complete;
	}

	public void setComplete(Boolean complete) {
		this.complete = complete;
	}



	


}